home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / misc / ManBrowser1_1.lha / Inlines.h < prev    next >
C/C++ Source or Header  |  1994-09-06  |  21KB  |  744 lines

  1. #define BASE_PAR_DECL
  2. #define BASE_PAR_DECL0 void
  3. #define BASE_EXT_DECL
  4. #define BASE_NAME SysBase
  5.  
  6. static __inline struct Task *
  7. FindTask (BASE_PAR_DECL UBYTE *name)
  8. {
  9.   BASE_EXT_DECL
  10.   register struct Task * _res  __asm("d0");
  11.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  12.   register UBYTE *a1 __asm("a1") = name;
  13.   __asm __volatile ("jsr a6@(-0x126)"
  14.   : "=r" (_res)
  15.   : "r" (a6), "r" (a1)
  16.   : "a0","a1","d0","d1", "cc");
  17.   return _res;
  18. }
  19. static __inline void 
  20. Forbid (BASE_PAR_DECL0)
  21. {
  22.   BASE_EXT_DECL
  23.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  24.   __asm __volatile ("jsr a6@(-0x84)"
  25.   : /* no output */
  26.   : "r" (a6)
  27.   : "cc");
  28. }
  29. static __inline struct Library *
  30. OpenLibrary (BASE_PAR_DECL UBYTE *libName,unsigned long version)
  31. {
  32.   BASE_EXT_DECL
  33.   register struct Library * _res  __asm("d0");
  34.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  35.   register UBYTE *a1 __asm("a1") = libName;
  36.   register unsigned long d0 __asm("d0") = version;
  37.   __asm __volatile ("jsr a6@(-0x228)"
  38.   : "=r" (_res)
  39.   : "r" (a6), "r" (a1), "r" (d0)
  40.   : "a0","a1","d0","d1", "cc");
  41.   return _res;
  42. }
  43. static __inline void 
  44. CloseLibrary (BASE_PAR_DECL struct Library *library)
  45. {
  46.   BASE_EXT_DECL
  47.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  48.   register struct Library *a1 __asm("a1") = library;
  49.   __asm __volatile ("jsr a6@(-0x19e)"
  50.   : /* no output */
  51.   : "r" (a6), "r" (a1)
  52.   : "a0","a1","d0","d1", "cc");
  53. }
  54.  
  55. #ifdef V39
  56. static __inline APTR 
  57. AllocPooled (BASE_PAR_DECL APTR poolHeader,unsigned long memSize)
  58. {
  59.   BASE_EXT_DECL
  60.   register APTR  _res  __asm("d0");
  61.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  62.   register APTR a0 __asm("a0") = poolHeader;
  63.   register unsigned long d0 __asm("d0") = memSize;
  64.   __asm __volatile ("jsr a6@(-0x2c4)"
  65.   : "=r" (_res)
  66.   : "r" (a6), "r" (a0), "r" (d0)
  67.   : "a0","a1","d0","d1", "cc");
  68.   return _res;
  69. }
  70. static __inline void 
  71. FreePooled (BASE_PAR_DECL APTR poolHeader,APTR memory,unsigned long memSize)
  72. {
  73.   BASE_EXT_DECL
  74.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  75.   register APTR a0 __asm("a0") = poolHeader;
  76.   register APTR a1 __asm("a1") = memory;
  77.   register unsigned long d0 __asm("d0") = memSize;
  78.   __asm __volatile ("jsr a6@(-0x2ca)"
  79.   : /* no output */
  80.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  81.   : "a0","a1","d0","d1", "cc");
  82. }
  83. static __inline APTR 
  84. CreatePool (BASE_PAR_DECL unsigned long requirements,unsigned long puddleSize,unsigned long threshSize)
  85. {
  86.   BASE_EXT_DECL
  87.   register APTR  _res  __asm("d0");
  88.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  89.   register unsigned long d0 __asm("d0") = requirements;
  90.   register unsigned long d1 __asm("d1") = puddleSize;
  91.   register unsigned long d2 __asm("d2") = threshSize;
  92.   __asm __volatile ("jsr a6@(-0x2b8)"
  93.   : "=r" (_res)
  94.   : "r" (a6), "r" (d0), "r" (d1), "r" (d2)
  95.   : "a0","a1","d0","d1","cc");
  96.   return _res;
  97. }
  98. static __inline void 
  99. DeletePool (BASE_PAR_DECL APTR poolHeader)
  100. {
  101.   BASE_EXT_DECL
  102.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  103.   register APTR a0 __asm("a0") = poolHeader;
  104.   __asm __volatile ("jsr a6@(-0x2be)"
  105.   : /* no output */
  106.   : "r" (a6), "r" (a0)
  107.   : "a0","a1","d0","d1", "cc");
  108. }
  109. #endif   /* V39 */
  110.  
  111. static __inline struct Message *
  112. GetMsg (BASE_PAR_DECL struct MsgPort *port)
  113. {
  114.   BASE_EXT_DECL
  115.   register struct Message * _res  __asm("d0");
  116.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  117.   register struct MsgPort *a0 __asm("a0") = port;
  118.   __asm __volatile ("jsr a6@(-0x174)"
  119.   : "=r" (_res)
  120.   : "r" (a6), "r" (a0)
  121.   : "a0","a1","d0","d1", "cc");
  122.   return _res;
  123. }
  124. static __inline struct Message *
  125. WaitPort (BASE_PAR_DECL struct MsgPort *port)
  126. {
  127.   BASE_EXT_DECL
  128.   register struct Message * _res  __asm("d0");
  129.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  130.   register struct MsgPort *a0 __asm("a0") = port;
  131.   __asm __volatile ("jsr a6@(-0x180)"
  132.   : "=r" (_res)
  133.   : "r" (a6), "r" (a0)
  134.   : "a0","a1","d0","d1", "cc");
  135.   return _res;
  136. }
  137. static __inline void 
  138. ReplyMsg (BASE_PAR_DECL struct Message *message)
  139. {
  140.   BASE_EXT_DECL
  141.   register struct ExecBase *a6 __asm("a6") = BASE_NAME;
  142.   register struct Message *a1 __asm("a1") = message;
  143.   __asm __volatile ("jsr a6@(-0x17a)"
  144.   : /* no output */
  145.   : "r" (a6), "r" (a1)
  146.   : "a0","a1","d0","d1", "cc");
  147. }
  148.  
  149. #undef BASE_NAME
  150. #undef BASE_EXT_DECL
  151. #undef BASE_PAR_DECL0
  152. #undef BASE_PAR_DECL
  153.  
  154. #define BASE_PAR_DECL
  155. #define BASE_PAR_DECL0 void
  156. #define BASE_EXT_DECL
  157. #define BASE_NAME IntuitionBase
  158.  
  159. static __inline LONG 
  160. EasyRequestArgs (BASE_PAR_DECL struct Window *window,struct EasyStruct *easyStruct,ULONG *idcmpPtr,APTR args)
  161. {
  162.   BASE_EXT_DECL
  163.   register LONG  _res  __asm("d0");
  164.   register struct IntuitionBase* a6 __asm("a6") = BASE_NAME;
  165.   register struct Window *a0 __asm("a0") = window;
  166.   register struct EasyStruct *a1 __asm("a1") = easyStruct;
  167.   register ULONG *a2 __asm("a2") = idcmpPtr;
  168.   register APTR a3 __asm("a3") = args;
  169.   __asm __volatile ("jsr a6@(-0x24c)"
  170.   : "=r" (_res)
  171.   : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (a3)
  172.   : "a0","a1","d0","d1", "cc","memory");
  173.   return _res;
  174. }
  175.  
  176. #undef BASE_NAME
  177. #undef BASE_EXT_DECL
  178. #undef BASE_PAR_DECL0
  179. #undef BASE_PAR_DECL
  180.  
  181. #define BASE_PAR_DECL
  182. #define BASE_PAR_DECL0 void
  183. #define BASE_EXT_DECL
  184. #define BASE_NAME AmigaGuideBase
  185.  
  186. static __inline APTR 
  187. AddAmigaGuideHostA (BASE_PAR_DECL struct Hook *h,STRPTR name,struct TagItem *attrs)
  188. {
  189.   BASE_EXT_DECL
  190.   register APTR  _res  __asm("d0");
  191.   register struct Library* a6 __asm("a6") = BASE_NAME;
  192.   register struct Hook *a0 __asm("a0") = h;
  193.   register STRPTR d0 __asm("d0") = name;
  194.   register struct TagItem *a1 __asm("a1") = attrs;
  195.   __asm __volatile ("jsr a6@(-0x8a)"
  196.   : "=r" (_res)
  197.   : "r" (a6), "r" (a0), "r" (d0), "r" (a1)
  198.   : "a0","a1","d0","d1", "cc");
  199.   return _res;
  200. }
  201. static __inline LONG 
  202. RemoveAmigaGuideHostA (BASE_PAR_DECL APTR hh,struct TagItem *attrs)
  203. {
  204.   BASE_EXT_DECL
  205.   register LONG  _res  __asm("d0");
  206.   register struct Library* a6 __asm("a6") = BASE_NAME;
  207.   register APTR a0 __asm("a0") = hh;
  208.   register struct TagItem *a1 __asm("a1") = attrs;
  209.   __asm __volatile ("jsr a6@(-0x90)"
  210.   : "=r" (_res)
  211.   : "r" (a6), "r" (a0), "r" (a1)
  212.   : "a0","a1","d0","d1", "cc");
  213.   return _res;
  214. }
  215. static __inline APTR 
  216. OpenAmigaGuideA (BASE_PAR_DECL struct NewAmigaGuide *nag,struct TagItem *TagList)
  217. {
  218.   BASE_EXT_DECL
  219.   register APTR  _res  __asm("d0");
  220.   register struct Library* a6 __asm("a6") = BASE_NAME;
  221.   register struct NewAmigaGuide *a0 __asm("a0") = nag;
  222.   register struct TagItem *a1 __asm("a1") = TagList;
  223.   __asm __volatile ("jsr a6@(-0x36)"
  224.   : "=r" (_res)
  225.   : "r" (a6), "r" (a0), "r" (a1)
  226.   : "a0","a1","d0","d1", "cc");
  227.   return _res;
  228. }
  229. static __inline void 
  230. CloseAmigaGuide (BASE_PAR_DECL APTR cl)
  231. {
  232.   BASE_EXT_DECL
  233.   register struct Library* a6 __asm("a6") = BASE_NAME;
  234.   register APTR a0 __asm("a0") = cl;
  235.   __asm __volatile ("jsr a6@(-0x42)"
  236.   : /* no output */
  237.   : "r" (a6), "r" (a0)
  238.   : "a0","a1","d0","d1", "cc");
  239. }
  240.  
  241. #undef BASE_NAME
  242. #undef BASE_EXT_DECL
  243. #undef BASE_PAR_DECL0
  244. #undef BASE_PAR_DECL
  245.  
  246. #define BASE_PAR_DECL
  247. #define BASE_PAR_DECL0 void
  248. #define BASE_EXT_DECL
  249. #define BASE_NAME UtilityBase
  250.  
  251. static __inline LONG 
  252. Stricmp (BASE_PAR_DECL STRPTR string1,STRPTR string2)
  253. {
  254.   BASE_EXT_DECL
  255.   register LONG  _res  __asm("d0");
  256.   register struct Library* a6 __asm("a6") = BASE_NAME;
  257.   register STRPTR a0 __asm("a0") = string1;
  258.   register STRPTR a1 __asm("a1") = string2;
  259.   __asm __volatile ("jsr a6@(-0xa2)"
  260.   : "=r" (_res)
  261.   : "r" (a6), "r" (a0), "r" (a1)
  262.   : "a0","a1","d0","d1", "cc");
  263.   return _res;
  264. }
  265. static __inline LONG 
  266. Strnicmp (BASE_PAR_DECL STRPTR string1,STRPTR string2,long length)
  267. {
  268.   BASE_EXT_DECL
  269.   register LONG  _res  __asm("d0");
  270.   register struct Library* a6 __asm("a6") = BASE_NAME;
  271.   register STRPTR a0 __asm("a0") = string1;
  272.   register STRPTR a1 __asm("a1") = string2;
  273.   register long d0 __asm("d0") = length;
  274.   __asm __volatile ("jsr a6@(-0xa8)"
  275.   : "=r" (_res)
  276.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  277.   : "a0","a1","d0","d1", "cc");
  278.   return _res;
  279. }
  280.  
  281. #undef BASE_NAME
  282. #undef BASE_EXT_DECL
  283. #undef BASE_PAR_DECL0
  284. #undef BASE_PAR_DECL
  285.  
  286. #define BASE_PAR_DECL
  287. #define BASE_PAR_DECL0 void
  288. #define BASE_EXT_DECL
  289. #define BASE_NAME DOSBase
  290.  
  291. static __inline LONG 
  292. Read (BASE_PAR_DECL BPTR file,APTR buffer,long length)
  293. {
  294.   BASE_EXT_DECL
  295.   register LONG  _res  __asm("d0");
  296.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  297.   register BPTR d1 __asm("d1") = file;
  298.   register APTR d2 __asm("d2") = buffer;
  299.   register long d3 __asm("d3") = length;
  300.   __asm __volatile ("jsr a6@(-0x2a)"
  301.   : "=r" (_res)
  302.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  303.   : "a0","a1","d0","d1","cc","memory");
  304.   return _res;
  305. }
  306. static __inline BOOL 
  307. ExamineFH (BASE_PAR_DECL BPTR fh,struct FileInfoBlock *fib)
  308. {
  309.   BASE_EXT_DECL
  310.   register BOOL  _res  __asm("d0");
  311.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  312.   register BPTR d1 __asm("d1") = fh;
  313.   register struct FileInfoBlock *d2 __asm("d2") = fib;
  314.   __asm __volatile ("jsr a6@(-0x186)"
  315.   : "=r" (_res)
  316.   : "r" (a6), "r" (d1), "r" (d2)
  317.   : "a0","a1","d0","d1","cc","memory");
  318.   return _res;
  319. }
  320. static __inline void 
  321. Delay (BASE_PAR_DECL long timeout)
  322. {
  323.   BASE_EXT_DECL
  324.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  325.   register long d1 __asm("d1") = timeout;
  326.   __asm __volatile ("jsr a6@(-0xc6)"
  327.   : /* no output */
  328.   : "r" (a6), "r" (d1)
  329.   : "a0","a1","d0","d1", "cc");
  330. }
  331. static __inline LONG 
  332. DeleteFile (BASE_PAR_DECL STRPTR name)
  333. {
  334.   BASE_EXT_DECL
  335.   register LONG  _res  __asm("d0");
  336.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  337.   register STRPTR d1 __asm("d1") = name;
  338.   __asm __volatile ("jsr a6@(-0x48)"
  339.   : "=r" (_res)
  340.   : "r" (a6), "r" (d1)
  341.   : "a0","a1","d0","d1", "cc");
  342.   return _res;
  343. }
  344. static __inline BOOL 
  345. MatchPatternNoCase (BASE_PAR_DECL STRPTR pat,STRPTR str)
  346. {
  347.   BASE_EXT_DECL
  348.   register BOOL  _res  __asm("d0");
  349.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  350.   register STRPTR d1 __asm("d1") = pat;
  351.   register STRPTR d2 __asm("d2") = str;
  352.   __asm __volatile ("jsr a6@(-0x3cc)"
  353.   : "=r" (_res)
  354.   : "r" (a6), "r" (d1), "r" (d2)
  355.   : "a0","a1","d0","d1", "cc");
  356.   return _res;
  357. }
  358. static __inline LONG 
  359. ParsePatternNoCase (BASE_PAR_DECL STRPTR pat,STRPTR buf,long buflen)
  360. {
  361.   BASE_EXT_DECL
  362.   register LONG  _res  __asm("d0");
  363.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  364.   register STRPTR d1 __asm("d1") = pat;
  365.   register STRPTR d2 __asm("d2") = buf;
  366.   register long d3 __asm("d3") = buflen;
  367.   __asm __volatile ("jsr a6@(-0x3c6)"
  368.   : "=r" (_res)
  369.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  370.   : "a0","a1","d0","d1", "cc","memory");
  371.   return _res;
  372. }
  373. static __inline LONG 
  374. NameFromLock (BASE_PAR_DECL BPTR lock,STRPTR buffer,long len)
  375. {
  376.   BASE_EXT_DECL
  377.   register LONG  _res  __asm("d0");
  378.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  379.   register BPTR d1 __asm("d1") = lock;
  380.   register STRPTR d2 __asm("d2") = buffer;
  381.   register long d3 __asm("d3") = len;
  382.   __asm __volatile ("jsr a6@(-0x192)"
  383.   : "=r" (_res)
  384.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  385.   : "a0","a1","d0","d1", "cc","memory");
  386.   return _res;
  387. }
  388. static __inline LONG 
  389. PutStr (BASE_PAR_DECL STRPTR str)
  390. {
  391.   BASE_EXT_DECL
  392.   register LONG  _res  __asm("d0");
  393.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  394.   register STRPTR d1 __asm("d1") = str;
  395.   __asm __volatile ("jsr a6@(-0x3b4)"
  396.   : "=r" (_res)
  397.   : "r" (a6), "r" (d1)
  398.   : "a0","a1","d0","d1", "cc");
  399.   return _res;
  400. }
  401. static __inline struct RDArgs *
  402. ReadArgs (BASE_PAR_DECL STRPTR arg_template,LONG *array,struct RDArgs *args)
  403. {
  404.   BASE_EXT_DECL
  405.   register struct RDArgs * _res  __asm("d0");
  406.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  407.   register STRPTR d1 __asm("d1") = arg_template;
  408.   register LONG *d2 __asm("d2") = array;
  409.   register struct RDArgs *d3 __asm("d3") = args;
  410.   __asm __volatile ("jsr a6@(-0x31e)"
  411.   : "=r" (_res)
  412.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  413.   : "a0","a1","d0","d1","cc","memory");
  414.   return _res;
  415. }
  416. static __inline LONG 
  417. IoErr (BASE_PAR_DECL0)
  418. {
  419.   BASE_EXT_DECL
  420.   register LONG  _res  __asm("d0");
  421.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  422.   __asm __volatile ("jsr a6@(-0x84)"
  423.   : "=r" (_res)
  424.   : "r" (a6)
  425.   : "a0","a1","d0","d1", "cc");
  426.   return _res;
  427. }
  428. static __inline BPTR 
  429. SelectInput (BASE_PAR_DECL BPTR fh)
  430. {
  431.   BASE_EXT_DECL
  432.   register BPTR  _res  __asm("d0");
  433.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  434.   register BPTR d1 __asm("d1") = fh;
  435.   __asm __volatile ("jsr a6@(-0x126)"
  436.   : "=r" (_res)
  437.   : "r" (a6), "r" (d1)
  438.   : "a0","a1","d0","d1", "cc");
  439.   return _res;
  440. }
  441. static __inline LONG 
  442. FGetC (BASE_PAR_DECL BPTR fh)
  443. {
  444.   BASE_EXT_DECL
  445.   register LONG  _res  __asm("d0");
  446.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  447.   register BPTR d1 __asm("d1") = fh;
  448.   __asm __volatile ("jsr a6@(-0x132)"
  449.   : "=r" (_res)
  450.   : "r" (a6), "r" (d1)
  451.   : "a0","a1","d0","d1", "cc");
  452.   return _res;
  453. }
  454. static __inline LONG 
  455. UnGetC (BASE_PAR_DECL BPTR fh,long character)
  456. {
  457.   BASE_EXT_DECL
  458.   register LONG  _res  __asm("d0");
  459.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  460.   register BPTR d1 __asm("d1") = fh;
  461.   register long d2 __asm("d2") = character;
  462.   __asm __volatile ("jsr a6@(-0x13e)"
  463.   : "=r" (_res)
  464.   : "r" (a6), "r" (d1), "r" (d2)
  465.   : "a0","a1","d0","d1","cc");
  466.   return _res;
  467. }
  468. static __inline LONG 
  469. NameFromFH (BASE_PAR_DECL BPTR fh,STRPTR buffer,long len)
  470. {
  471.   BASE_EXT_DECL
  472.   register LONG  _res  __asm("d0");
  473.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  474.   register BPTR d1 __asm("d1") = fh;
  475.   register STRPTR d2 __asm("d2") = buffer;
  476.   register long d3 __asm("d3") = len;
  477.   __asm __volatile ("jsr a6@(-0x198)"
  478.   : "=r" (_res)
  479.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  480.   : "a0","a1","d0","d1","cc","memory");
  481.   return _res;
  482. }
  483. static __inline LONG 
  484. VPrintf (BASE_PAR_DECL STRPTR format,APTR argarray)
  485. {
  486.   BASE_EXT_DECL
  487.   register LONG  _res  __asm("d0");
  488.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  489.   register STRPTR d1 __asm("d1") = format;
  490.   register APTR d2 __asm("d2") = argarray;
  491.   __asm __volatile ("jsr a6@(-0x3ba)"
  492.   : "=r" (_res)
  493.   : "r" (a6), "r" (d1), "r" (d2)
  494.   : "a0","a1","d0","d1","cc");
  495.   return _res;
  496. }
  497. static __inline LONG 
  498. VFPrintf (BASE_PAR_DECL BPTR fh,STRPTR format,APTR argarray)
  499. {
  500.   BASE_EXT_DECL
  501.   register LONG  _res  __asm("d0");
  502.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  503.   register BPTR d1 __asm("d1") = fh;
  504.   register STRPTR d2 __asm("d2") = format;
  505.   register APTR d3 __asm("d3") = argarray;
  506.   __asm __volatile ("jsr a6@(-0x162)"
  507.   : "=r" (_res)
  508.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3)
  509.   : "a0","a1","d0","d1","cc");
  510.   return _res;
  511. }
  512. static __inline BPTR 
  513. Open (BASE_PAR_DECL STRPTR name,long accessMode)
  514. {
  515.   BASE_EXT_DECL
  516.   register BPTR  _res  __asm("d0");
  517.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  518.   register STRPTR d1 __asm("d1") = name;
  519.   register long d2 __asm("d2") = accessMode;
  520.   __asm __volatile ("jsr a6@(-0x1e)"
  521.   : "=r" (_res)
  522.   : "r" (a6), "r" (d1), "r" (d2)
  523.   : "a0","a1","d0","d1","cc");
  524.   return _res;
  525. }
  526. static __inline LONG 
  527. Close (BASE_PAR_DECL BPTR file)
  528. {
  529.   BASE_EXT_DECL
  530.   register LONG  _res  __asm("d0");
  531.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  532.   register BPTR d1 __asm("d1") = file;
  533.   __asm __volatile ("jsr a6@(-0x24)"
  534.   : "=r" (_res)
  535.   : "r" (a6), "r" (d1)
  536.   : "a0","a1","d0","d1", "cc");
  537.   return _res;
  538. }
  539. static __inline void 
  540. FreeArgs (BASE_PAR_DECL struct RDArgs *args)
  541. {
  542.   BASE_EXT_DECL
  543.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  544.   register struct RDArgs *d1 __asm("d1") = args;
  545.   __asm __volatile ("jsr a6@(-0x35a)"
  546.   : /* no output */
  547.   : "r" (a6), "r" (d1)
  548.   : "a0","a1","d0","d1", "cc");
  549. }
  550. static __inline BPTR 
  551. Lock (BASE_PAR_DECL STRPTR name,long type)
  552. {
  553.   BASE_EXT_DECL
  554.   register BPTR  _res  __asm("d0");
  555.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  556.   register STRPTR d1 __asm("d1") = name;
  557.   register long d2 __asm("d2") = type;
  558.   __asm __volatile ("jsr a6@(-0x54)"
  559.   : "=r" (_res)
  560.   : "r" (a6), "r" (d1), "r" (d2)
  561.   : "a0","a1","d0","d1","cc");
  562.   return _res;
  563. }
  564. static __inline void 
  565. UnLock (BASE_PAR_DECL BPTR lock)
  566. {
  567.   BASE_EXT_DECL
  568.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  569.   register BPTR d1 __asm("d1") = lock;
  570.   __asm __volatile ("jsr a6@(-0x5a)"
  571.   : /* no output */
  572.   : "r" (a6), "r" (d1)
  573.   : "a0","a1","d0","d1", "cc");
  574. }
  575. static __inline BPTR 
  576. CurrentDir (BASE_PAR_DECL BPTR lock)
  577. {
  578.   BASE_EXT_DECL
  579.   register BPTR  _res  __asm("d0");
  580.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  581.   register BPTR d1 __asm("d1") = lock;
  582.   __asm __volatile ("jsr a6@(-0x7e)"
  583.   : "=r" (_res)
  584.   : "r" (a6), "r" (d1)
  585.   : "a0","a1","d0","d1", "cc");
  586.   return _res;
  587. }
  588. static __inline LONG 
  589. ExAll (BASE_PAR_DECL BPTR lock,struct ExAllData *buffer,long size,long data,struct ExAllControl *control)
  590. {
  591.   BASE_EXT_DECL
  592.   register LONG  _res  __asm("d0");
  593.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  594.   register BPTR d1 __asm("d1") = lock;
  595.   register struct ExAllData *d2 __asm("d2") = buffer;
  596.   register long d3 __asm("d3") = size;
  597.   register long d4 __asm("d4") = data;
  598.   register struct ExAllControl *d5 __asm("d5") = control;
  599.   __asm __volatile ("jsr a6@(-0x1b0)"
  600.   : "=r" (_res)
  601.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (d5)
  602.   : "a0","a1","d0","d1","cc","memory");
  603.   return _res;
  604. }
  605. static __inline void 
  606. ExAllEnd (BASE_PAR_DECL BPTR lock,struct ExAllData *buffer,long size,long data,struct ExAllControl *control)
  607. {
  608.   BASE_EXT_DECL
  609.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  610.   register BPTR d1 __asm("d1") = lock;
  611.   register struct ExAllData *d2 __asm("d2") = buffer;
  612.   register long d3 __asm("d3") = size;
  613.   register long d4 __asm("d4") = data;
  614.   register struct ExAllControl *d5 __asm("d5") = control;
  615.   __asm __volatile ("jsr a6@(-0x3de)"
  616.   : /* no output */
  617.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3), "r" (d4), "r" (d5)
  618.   : "a0","a1","d0","d1","cc","memory");
  619. }
  620. static __inline LONG 
  621. Examine (BASE_PAR_DECL BPTR lock,struct FileInfoBlock *fileInfoBlock)
  622. {
  623.   BASE_EXT_DECL
  624.   register LONG  _res  __asm("d0");
  625.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  626.   register BPTR d1 __asm("d1") = lock;
  627.   register struct FileInfoBlock *d2 __asm("d2") = fileInfoBlock;
  628.   __asm __volatile ("jsr a6@(-0x66)"
  629.   : "=r" (_res)
  630.   : "r" (a6), "r" (d1), "r" (d2)
  631.   : "a0","a1","d0","d1","cc","memory");
  632.   return _res;
  633. }
  634. static __inline BOOL 
  635. Fault (BASE_PAR_DECL long code,STRPTR header,STRPTR buffer,long len)
  636. {
  637.   BASE_EXT_DECL
  638.   register BOOL  _res  __asm("d0");
  639.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  640.   register long d1 __asm("d1") = code;
  641.   register STRPTR d2 __asm("d2") = header;
  642.   register STRPTR d3 __asm("d3") = buffer;
  643.   register long d4 __asm("d4") = len;
  644.   __asm __volatile ("jsr a6@(-0x1d4)"
  645.   : "=r" (_res)
  646.   : "r" (a6), "r" (d1), "r" (d2), "r" (d3), "r" (d4)
  647.   : "a0","a1","d0","d1","cc","memory");
  648.   return _res;
  649. }
  650. static __inline BOOL 
  651. PrintFault (BASE_PAR_DECL long code,STRPTR header)
  652. {
  653.   BASE_EXT_DECL
  654.   register BOOL  _res  __asm("d0");
  655.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  656.   register long d1 __asm("d1") = code;
  657.   register STRPTR d2 __asm("d2") = header;
  658.   __asm __volatile ("jsr a6@(-0x1da)"
  659.   : "=r" (_res)
  660.   : "r" (a6), "r" (d1), "r" (d2)
  661.   : "a0","a1","d0","d1","cc");
  662.   return _res;
  663. }
  664. static __inline APTR 
  665. AllocDosObject (BASE_PAR_DECL unsigned long type,struct TagItem *tags)
  666. {
  667.   BASE_EXT_DECL
  668.   register APTR  _res  __asm("d0");
  669.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  670.   register unsigned long d1 __asm("d1") = type;
  671.   register struct TagItem *d2 __asm("d2") = tags;
  672.   __asm __volatile ("jsr a6@(-0xe4)"
  673.   : "=r" (_res)
  674.   : "r" (a6), "r" (d1), "r" (d2)
  675.   : "a0","a1","d0","d1","cc");
  676.   return _res;
  677. }
  678. static __inline void 
  679. FreeDosObject (BASE_PAR_DECL unsigned long type,APTR ptr)
  680. {
  681.   BASE_EXT_DECL
  682.   register struct DosLibrary *a6 __asm("a6") = BASE_NAME;
  683.   register unsigned long d1 __asm("d1") = type;
  684.   register APTR d2 __asm("d2") = ptr;
  685.   __asm __volatile ("jsr a6@(-0xea)"
  686.   : /* no output */
  687.   : "r" (a6), "r" (d1), "r" (d2)
  688.   : "a0","a1","d0","d1","cc");
  689. }
  690.  
  691. #undef BASE_NAME
  692. #undef BASE_EXT_DECL
  693. #undef BASE_PAR_DECL0
  694. #undef BASE_PAR_DECL
  695.  
  696. #define BASE_PAR_DECL struct Library *IconBase,
  697. #define BASE_PAR_DECL0 struct Library *IconBase
  698. #define BASE_EXT_DECL
  699. #define BASE_NAME IconBase
  700.  
  701. static __inline struct DiskObject *
  702. GetDiskObject (BASE_PAR_DECL UBYTE *name)
  703. {
  704.   BASE_EXT_DECL
  705.   register struct DiskObject * _res  __asm("d0");
  706.   register struct Library *a6 __asm("a6") = BASE_NAME;
  707.   register UBYTE *a0 __asm("a0") = name;
  708.   __asm __volatile ("jsr a6@(-0x4e)"
  709.   : "=r" (_res)
  710.   : "r" (a6), "r" (a0)
  711.   : "a0","a1","d0","d1", "cc");
  712.   return _res;
  713. }
  714. static __inline void 
  715. FreeDiskObject (BASE_PAR_DECL struct DiskObject *diskobj)
  716. {
  717.   BASE_EXT_DECL
  718.   register struct Library *a6 __asm("a6") = BASE_NAME;
  719.   register struct DiskObject *a0 __asm("a0") = diskobj;
  720.   __asm __volatile ("jsr a6@(-0x5a)"
  721.   : /* no output */
  722.   : "r" (a6), "r" (a0)
  723.   : "a0","a1","d0","d1", "cc");
  724. }
  725. static __inline UBYTE *
  726. FindToolType (BASE_PAR_DECL UBYTE **toolTypeArray,UBYTE *typeName)
  727. {
  728.   BASE_EXT_DECL
  729.   register UBYTE * _res  __asm("d0");
  730.   register struct Library *a6 __asm("a6") = BASE_NAME;
  731.   register UBYTE **a0 __asm("a0") = toolTypeArray;
  732.   register UBYTE *a1 __asm("a1") = typeName;
  733.   __asm __volatile ("jsr a6@(-0x60)"
  734.   : "=r" (_res)
  735.   : "r" (a6), "r" (a0), "r" (a1)
  736.   : "a0","a1","d0","d1", "cc");
  737.   return _res;
  738. }
  739.  
  740. #undef BASE_NAME
  741. #undef BASE_EXT_DECL
  742. #undef BASE_PAR_DECL0
  743. #undef BASE_PAR_DECL
  744.